{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 高斯核函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = np.arange(-4, 5, 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "y = np.array((x >= -2)&(x <= 2), dtype='int')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 0, 1, 1, 1, 1, 1, 0, 0])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0xd48878fa08>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYkAAAD7CAYAAACfQGjDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAT6UlEQVR4nO3df9CdZX3n8fdnE8DULb+DhQQ2zJI6S9XFegbdcXbHFYHoWkJdWtNx23SKk7YjYzu7tQvLVNy4bkGma9eR6U4UVnRrgaFaoq2NAWQ6nVHMk4r8bEqGYvMAK7FBVrtUDf3uH+eOe3g81/Mj5+Q5B3i/Zu45933d133dX0LO83nun0lVIUnSMP9o0gVIkqaXISFJajIkJElNhoQkqcmQkCQ1GRKSpKaxhESSDUn2JNmb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wB/nGTHpGrpLuxfRv9Flw8Bt1TVA5Oq55AkfwB8CXh59960SyddU+f1wM8Dbxz454vfMumigFOBL3bfwV30r0mM/XbTaeQT15KkJo8kJElNhoQkqcmQkCQ1GRKSpCZDQpLUZEhIkpoMCUlSkyEhSWr6fx8OuWGKiFvbAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x[y==0], [0]*len(x[y==0]))\n",
    "plt.scatter(x[y==1], [0]*len(x[y==1]))        #线性不可分"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "#映射到二维空间后变为可分\n",
    "\n",
    "def gaussian(x, l):              # l:地标\n",
    "    gamma = 1.0\n",
    "    return np.exp(-gamma * (x-l)**2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "l1, l2 = -1, 1                   # 两个固定地标\n",
    "X_new = np.empty((len(x), 2))     \n",
    "for i, data in enumerate(x):\n",
    "    X_new[i, 0] = gaussian(data, l1)\n",
    "    X_new[i, 1] = gaussian(data, l2)     #一维数据映射到二维空间，和两个地标分布运算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0xd4892e0388>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAQpUlEQVR4nO3df6jdd33H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7TK0eky358ClwIkeR29QJ9d0iqX1j7gnf1Pu1wMHKuqn53REZf7neBFvGN8OfA/9N4p/0i/bze9X2zonfwvA4eA/wZevdw1j3m+/wn8H/C9/p99y13zOOc7b+y3mPBPuXQ8xwH+CXgUeBi4erlrHvN8twLfofcJmO8Bf77cNZ/hfL8I/Aw4Qe9q/FrgPcB75pzf2/t/Hw+P4mfaW/8lqRGTsuQiSRrCQJekRhjoktQIA12SGmGgS1IjDHRJaoSBLkmN+H92i9H5rZPLLQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(X_new[y==0,0], X_new[y==0,1])\n",
    "plt.scatter(X_new[y==1,0], X_new[y==1,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
